package com.minimalist.common.entity.lindi.po;

import com.minimalist.common.config.mybatis.InsertFullColumnHandler;
import com.minimalist.common.config.mybatis.UpdateFullColumnHandler;
import com.minimalist.common.config.mybatis.bo.BaseEntity;
import com.mybatisflex.annotation.Table;
import java.io.Serial;
import java.io.Serializable;

/**
 * 林地指标交易平台_交易申请审批文件 实体类。
 *
 * @author 11987
 * @since 2025-06-07
 */
@Table(value = "LINDI_TRADE_APPLICATION_APPROVE_FILE", onInsert = InsertFullColumnHandler.class, onUpdate = UpdateFullColumnHandler.class)
public class LindiTradeApplicationApproveFile extends BaseEntity implements Serializable{

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 审批文件ID
     */
    private Long approveFileId;

    /**
     * 审批文件名称
     */
    private String approveFileName;

    /**
     * 文件ID
     */
    private Long fileId;

    /**
     * 交易申请ID
     */
    private Long tradeApplicationId;

    public LindiTradeApplicationApproveFile() {
    }

    public LindiTradeApplicationApproveFile(Long approveFileId, String approveFileName, Long fileId, Long tradeApplicationId) {
        this.approveFileId = approveFileId;
        this.approveFileName = approveFileName;
        this.fileId = fileId;
        this.tradeApplicationId = tradeApplicationId;
    }

    public Long getApproveFileId() {
        return approveFileId;
    }

    public void setApproveFileId(Long approveFileId) {
        this.approveFileId = approveFileId;
    }

    public String getApproveFileName() {
        return approveFileName;
    }

    public void setApproveFileName(String approveFileName) {
        this.approveFileName = approveFileName;
    }

    public Long getFileId() {
        return fileId;
    }

    public void setFileId(Long fileId) {
        this.fileId = fileId;
    }

    public Long getTradeApplicationId() {
        return tradeApplicationId;
    }

    public void setTradeApplicationId(Long tradeApplicationId) {
        this.tradeApplicationId = tradeApplicationId;
    }

    public static LindiTradeApplicationApproveFileBuilder builder() {
        return new LindiTradeApplicationApproveFileBuilder();
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        LindiTradeApplicationApproveFile that = (LindiTradeApplicationApproveFile) o;
        return java.util.Objects.equals(approveFileId, that.approveFileId) &&
               java.util.Objects.equals(approveFileName, that.approveFileName) &&
               java.util.Objects.equals(fileId, that.fileId) &&
               java.util.Objects.equals(tradeApplicationId, that.tradeApplicationId);
    }

    @Override
    public int hashCode() {
        return java.util.Objects.hash(super.hashCode(), approveFileId, approveFileName, fileId, tradeApplicationId);
    }

    public static class LindiTradeApplicationApproveFileBuilder {
        private Long approveFileId;
        private String approveFileName;
        private Long fileId;
        private Long tradeApplicationId;

        public LindiTradeApplicationApproveFileBuilder approveFileId(Long approveFileId) {
            this.approveFileId = approveFileId;
            return this;
        }

        public LindiTradeApplicationApproveFileBuilder approveFileName(String approveFileName) {
            this.approveFileName = approveFileName;
            return this;
        }

        public LindiTradeApplicationApproveFileBuilder fileId(Long fileId) {
            this.fileId = fileId;
            return this;
        }

        public LindiTradeApplicationApproveFileBuilder tradeApplicationId(Long tradeApplicationId) {
            this.tradeApplicationId = tradeApplicationId;
            return this;
        }

        public LindiTradeApplicationApproveFile build() {
            return new LindiTradeApplicationApproveFile(approveFileId, approveFileName, fileId, tradeApplicationId);
        }
    }

}
